import request from '@/utils/request'

const baseUrl = '/api/work-plan-assessment'

// 保存工作计划考核
export function saveWorkPlanAssessment(data) {
    return request({
        url: `${baseUrl}/save`,
        method: 'post',
        data
    })
}

// 获取工作计划考核列表
export function getWorkPlanAssessmentList(params) {
    return request({
        url: `${baseUrl}/list`,
        method: 'get',
        params
    })
}

// 获取工作计划考核详情
export function getWorkPlanAssessmentDetail(id) {
    return request({
        url: `/api/work-plan-assessment/view/${id}`,
        method: 'get'
    })
}

// 删除工作计划考核
export function deleteWorkPlanAssessment(id) {
    return request({
        url: `${baseUrl}/${id}`,
        method: 'delete'
    })
}

// 获取工作计划考核类别列表
export function getWorkPlanCategories() {
    return request({
        url: `${baseUrl}/categories`,
        method: 'get'
    })
}

// 更新工作计划考核
export function updateWorkPlanAssessment(data) {
    return request({
        url: '/api/work-plan-assessment/update',
        method: 'put',
        data
    })
} 